from core.basehandler import BaseHandler
from core.room import Room
from core.action import Action

class StartingPoint(Room):
    
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        
        # build list of actions
        self.add_action(Lannister)
        self.add_action(Stark)
    
    def get_description(self):
        return ''' '''
    # return image of room

class StartingPointHandler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return StartingPoint
    
    def get_template(self):
        return 'welcome.html'

# define actions for this room

class Lannister(Action):
    def __init__(self):
        Action.__init__(self, "Lannister")    # do basic initialization for every action
    
    def get_description(self):
        return "Choose the Lannisters."
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'formlannister'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"
    
class Stark(Action):
    def __init__(self):
        Action.__init__(self, "Stark")    # do basic initialization for every action
    
    def get_description(self):
        return "Choose the Starks."
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'formstark'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"